<%@ page import="com.fhd.constant.Constants" %>
<%@ page import="com.fhd.pojo.Merchant" %><%--
  Created by IntelliJ IDEA.
  User: 44252
  Date: 2025/3/30
  Time: 11:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商户个人信息</title>
</head>
<body>
账号信息如下：
<br>
<%
    Object object = request.getSession().getAttribute(Constants.MERCHANT_SESSION);
    if (object != null) {
        Merchant merchant = (Merchant) object;
        out.print("商户id：" + merchant.getId() + "<br>");
        out.print("账号：" + merchant.getUserCode() + "<br>");
        out.print("昵称：" + merchant.getUserName() + "<br>");
        out.print("店铺名：" + merchant.getShopName() + "<br>");
        out.print("联系电话：" + merchant.getPhone() + "<br>");
        out.print("关键词：" + merchant.getKeyWord() + "<br>");
        out.print("工作时间：" + merchant.getWorkTimeBegin() + "~~~" + merchant.getWorkTimeEnd() + "<br>");
        int openSituation = merchant.getOpenSituation();
        if (openSituation == 0) {
            out.print("营业状态：未营业" + "<br>");
        } else {
            out.print("营业状态：营业中" + "<br>");
        }
        int applySituation = merchant.getApplySituation();
        if (applySituation == 0) {
            out.print("申请状态：等待确认" + "<br>");
        } else if (applySituation == 1) {
            out.print("申请状态：已通过" + "<br>");
        } else {
            out.print("申请状态：被封禁" + "<br>");
        }
        out.print("收入：" + merchant.getMoney() + "<br>");
        out.print("销量：" + merchant.getSoldNumber() + "<br>");
        out.print("创建日期：" + merchant.getCreateDate() + "<br>");
    }
%>
<br>
<form action="merchantUpdateInformation.jsp">
  <input type="submit" value="修改个人信息">
</form>
<br>
<%--回到商户主页--%>
<a href="<%=request.getContextPath()%>/jsp/merchantFrame.jsp">返回</a>


</body>
</html>
